% This function takes a rental rate and spillovers and return the difference between the housing supply
% and housing demand. We search over the rental rate to find the one that sets supply equal to demand
function share_diff = find_rents_noedu(rs, Ss, Hs, Prob,educ_mat)
    global pi_theta r_base myiter
   
    [P_S, ~, ~, ~] = choiceProb_no_ed(Ss, rs,educ_mat);
    myDist0 = P_S .* Prob;
    myDist0  = sum(bsxfun(@times, myDist0 , reshape(pi_theta, [1,1,1,2])),4);
    H_dem = squeeze(sum(myDist0, 1:2));
    tmp = housing_supply(rs, Hs);
    share_diff = H_dem*(1.0893)^(myiter-1) - tmp;

end